package com.dc.refactoring._6_处理概括关系._6_ExtractSubclass.step5;

/**
 * Description: 用于专门处理工时报价的情况
 * @author: gdc
 * @date: 2020/12/12
 * @version 1.0
 */
public class LaborItem extends JobItem {

    private Employee employee;

    public LaborItem(int quantity, Employee employee) {
        super(quantity);
        this.employee = employee;
    }

    public Employee getEmployee() {
        return employee;
    }

    @Override
    public int getUnitPrice() {
        return employee.getRate();
    }
}
